Given two functions f and g we would like to be able to <#106#>compose<#106#>
them to produce a function that first applies g then applies f.
Normally, this is written as fog, but unfortunately TEX doesn't
have infix functions, so we'll have to write it #math91#Compose~f~g.
;SPMgt;From this definition, we can deduce that Compose is associative:
#math93#
Compose~(Compose~f~g)~h;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp; |
|
= |
Compose~f~(Compose~g~h) |
|
and Identity is the left unit of Compose:
The reader may wonder why Identity is called a <#114#>left<#114#> unit
even though it occurs on the right of the Compose --- this is a side-effect
of using prefix notations where infix is more normal. The infix version
of this equation is:
so Identity is indeed on the left of the composition.
Compose can be implemented in TEX as